/*
 * @Author: your name
 * @Date: 2020-04-28 20:07:32
 * @LastEditTime: 2020-05-06 23:33:36
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \myprojectg:\coding\yjw\src\service\weketang.js
 */
import Api from "./api";
import qs from 'qs'
import axios from "axios";
import { APIURL } from "utils/base";
class WeKeTangApis extends Api {
  constructor() {
    super();
  }
  // 雷霆微课堂首页
  getWktList () {
    return this.post(`${APIURL()}/backend/miroclass/queryMiroclassWithType`).then(({ data }) => {
      data.newClassList = data.newClassList.slice(0, 4);
      return data;
    });
  }
  //微课堂列表
  getwktType (json) {
    return this.post(`${APIURL()}/backend/miroclass/queryAllMiroclassList`, qs.stringify(json)).then(({ data }) => {
      return data;
    });
  }
  //微课堂详情
  getWktDetail (json) {
    return this.post(`${APIURL()}/backend/miroclass/queryMiroWithOtherById?time=${+new Date()}`, qs.stringify(json)).then(({ data }) => {
      //进行截取
      data.about = data.about.slice(0, 4);
      data.allClass=data.allClass.slice(0, 10);
      return data
    });
  }
}

export default new WeKeTangApis();
